package com.addplus.townmall.server.api.model.town.param;

import lombok.Data;

import java.util.List;

/**
 * @author fuyq
 * @date 2018/10/26
 */
@Data
public class SpecParam {

    private CostData costData;

    private List<Spec> spec;

    public class Spec {

        private Integer sId;

        private Integer vId;

        private String specId;

        private String specName;

        private String specValueId;

        private String specValue;

        public Integer getsId() {
            return sId;
        }

        public void setsId(Integer sId) {
            this.sId = sId;
        }

        public Integer getvId() {
            return vId;
        }

        public void setvId(Integer vId) {
            this.vId = vId;
        }

        public String getSpecId() {
            return specId;
        }

        public void setSpecId(String specId) {
            this.specId = specId;
        }

        public String getSpecName() {
            return specName;
        }

        public void setSpecName(String specName) {
            this.specName = specName;
        }

        public String getSpecValueId() {
            return specValueId;
        }

        public void setSpecValueId(String specValueId) {
            this.specValueId = specValueId;
        }

        public String getSpecValue() {
            return specValue;
        }

        public void setSpecValue(String specValue) {
            this.specValue = specValue;
        }

        @Override
        public int hashCode() {
            return specValueId.hashCode();
        }

        @Override
        public boolean equals(Object obj) {
            Spec spec = (Spec) obj;
            return specValueId.equals(((Spec) obj).getSpecValueId());
        }
    }

    public class CostData {

        private String salePrice;

        private String costPrice;

        private String stock;

        private String linePrice;

        private String discountPrice;

        public String getSalePrice() {
            return salePrice;
        }

        public void setSalePrice(String salePrice) {
            this.salePrice = salePrice;
        }

        public String getCostPrice() {
            return costPrice;
        }

        public void setCostPrice(String costPrice) {
            this.costPrice = costPrice;
        }

        public String getStock() {
            return stock;
        }

        public void setStock(String stock) {
            this.stock = stock;
        }

        public String getLinePrice() {
            return linePrice;
        }

        public void setLinePrice(String linePrice) {
            this.linePrice = linePrice;
        }

        public String getDiscountPrice() {
            return discountPrice;
        }

        public void setDiscountPrice(String discountPrice) {
            this.discountPrice = discountPrice;
        }
    }
}
